<?php // $Id: details.php,v 1.4.2.1 2005/07/05 05:44:23 skodak Exp $
      // This script prints the setup screen for any ac assignment
      // It does this by calling the setup method in the appropriate class

    require_once("../../config.php");
    require_once("lib.php");

    if (!$form = data_submitted($CFG->wwwroot.'/course/mod.php')) {
        error("This script was called wrongly");
    }

    if (!$course = get_record('course', 'id', $form->course)) {
        error("Non-existent course!");
    }

    require_login($course->id);

    if (!isteacheredit($course->id)) {
        redirect($CFG->wwwroot.'/course/view.php?id='.$course->id);
    }
    
    //PAJA modify 18.4.2006 20:18:53
    $form->langtype = clean_param($form->langtype, PARAM_SAFEDIR);

    require_once("$CFG->dirroot/mod/aca/type/$form->langtype/aca.class.php");

    $acaclass = "aca_$form->langtype"; 
    
    $acainstance = new $acaclass();

    echo $acainstance->setup($form);     /// The actual form is all printed here

?>